package szytask1;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;

public class Task1 {
    public static void main(String[] args) throws IOException {
        HashMap<Integer,String> hashMap=new HashMap<Integer, String>();
        hashMap.put(1,"zcl");
        hashMap.put(2,"fbb");
        hashMap.put(3,"wy");
        hashMap.put(4,"zgq");
        hashMap.put(5,"zql");
        hashMap.put(6,"lts");
        BufferedWriter bw=new BufferedWriter(new FileWriter("pan.txt"));
        Iterator iterator=hashMap.keySet().iterator();
        while (iterator.hasNext()){
            Integer key= (Integer) iterator.next();
            String value=hashMap.get(key);
            bw.write(key+","+value);
            bw.newLine();
        }
        bw.close();
    }
}
